package com.kyh.entity;

import javax.persistence.Table;


import java.util.Date;

import com.kyh.annotation.Model;
import com.kyh.entity.base.BaseEntity;

/**
*/
@Table(name="arcticle")
public class Arcticle extends BaseEntity<Arcticle> {

	@Model(nameTable="id")
	private Long id; // 主键ID
	@Model(nameTable="itemId")
	private Long itemId; // 栏目ID
	@Model(nameTable="type")
	private Integer type; // 类型，1普通文章2外链文章
	@Model(nameTable="title")
	private String title; // 标题
	@Model(nameTable="subTitle")
	private String subTitle; // 副标题
	@Model(nameTable="keyword")
	private String keyword; // 关键字
	@Model(nameTable="content")
	private String content; // 内容
	@Model(nameTable="picIndex")
	private String picIndex; // 封面图片
	@Model(nameTable="remark")
	private String remark; // 备注说明
	@Model(nameTable="outLink")
	private String outLink; // 外链地址，类型为外链时有效
	@Model(nameTable="status")
	private Integer status; // 状态
	@Model(nameTable="createTime",type=Model.TYPE.DATE, format="yyyy-MM-dd HH:mm:ss")
	private Date createTime; // 
	@Model(nameTable="updateTime",type=Model.TYPE.DATE, format="yyyy-MM-dd HH:mm:ss")
	private Date updateTime; // 

	public Long getId() {
		return id;
	}
	public Arcticle setId(Long id) {
		this.id = id;
		return this;
	}
	public Long getItemId() {
		return itemId;
	}
	public Arcticle setItemId(Long itemId) {
		this.itemId = itemId;
		return this;
	}
	public Integer getType() {
		return type;
	}
	public Arcticle setType(Integer type) {
		this.type = type;
		return this;
	}
	public String getTitle() {
		return title;
	}
	public Arcticle setTitle(String title) {
		this.title = title;
		return this;
	}
	public String getSubTitle() {
		return subTitle;
	}
	public Arcticle setSubTitle(String subTitle) {
		this.subTitle = subTitle;
		return this;
	}
	public String getKeyword() {
		return keyword;
	}
	public Arcticle setKeyword(String keyword) {
		this.keyword = keyword;
		return this;
	}
	public String getContent() {
		return content;
	}
	public Arcticle setContent(String content) {
		this.content = content;
		return this;
	}
	public String getPicIndex() {
		return picIndex;
	}
	public Arcticle setPicIndex(String picIndex) {
		this.picIndex = picIndex;
		return this;
	}
	public String getRemark() {
		return remark;
	}
	public Arcticle setRemark(String remark) {
		this.remark = remark;
		return this;
	}
	public String getOutLink() {
		return outLink;
	}
	public Arcticle setOutLink(String outLink) {
		this.outLink = outLink;
		return this;
	}
	public Integer getStatus() {
		return status;
	}
	public Arcticle setStatus(Integer status) {
		this.status = status;
		return this;
	}
	public Date getCreateTime() {
		return createTime;
	}
	public Arcticle setCreateTime(Date createTime) {
		this.createTime = createTime;
		return this;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public Arcticle setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
		return this;
	}

	public static Arcticle arcticle(
			Long itemId,
			Integer type,
			String title,
			String subTitle,
			String keyword,
			String content,
			String picIndex,
			String remark,
			String outLink,
			Integer status
			) {
		Arcticle entity = new Arcticle();
		entity.setItemId(itemId);
		entity.setType(type);
		entity.setTitle(title);
		entity.setSubTitle(subTitle);
		entity.setKeyword(keyword);
		entity.setContent(content);
		entity.setPicIndex(picIndex);
		entity.setRemark(remark);
		entity.setOutLink(outLink);
		entity.setStatus(status);
		return entity;
	}
}